<!--工艺tab和内容-->
<template>
  <div>
    <series-tab :currentIndex="currentIndex" :tabIndex="sectionIndex" :detailList="sectionItem.detailList" @seriesTabIndexFunc="seriesTabIndexFunc"></series-tab>
    <div v-for="(sItem,sIndex) in sectionItem.detailList" :key="sIndex">
      <series-con 
        :seriesData="sItem"
        :disabled="disabled"
        v-show="sectionIndex === currentIndex && sIndex === detailListIndex"
      ></series-con>
    </div>
  </div>
</template>

<script>
import seriesTab from './seriesTab'
import seriesCon from './seriesCon'
export default {
  name: 'seriesTable',
  data () {
    return {
      detailListIndex: 0
    };
  },

  components: {
    seriesTab,
    seriesCon,
  },

  props:{
    sectionItem:{
      type:Object,
      default(){
        return {}
      }
    },
    currentIndex:{
      type: Number,
      default: 0
    },
    sectionIndex:{
      type: Number,
      default: 0
    },
    disabled:{
      type: Boolean,
      default: false
    }
  },

  computed: {},

  mounted() {},

  methods: {
    seriesTabIndexFunc(value){
      this.detailListIndex = value
    }
  }
}

</script>
<style lang="less" scoped>
</style>